package cc.md888.app.web.controller;


import cc.md888.app.application.live.AccountCheckLiveService;
import cc.md888.app.model.live.CheckLiveCmd;
import cc.md888.app.model.live.CheckLiveResultVO;
import cc.md888.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "账号检测")
@RestController
@RequestMapping("/api/account")
public class AccountCheckController
{

    @Autowired
    private AccountCheckLiveService checkLiveService;

    /**
     * 检查账号存活状态
     * @param cmd
     * @return
     */
    @PostMapping("checkLive")
    @ApiOperation("检查账号存活状态")
    public Result<CheckLiveResultVO> check(@RequestBody CheckLiveCmd cmd){
        return Result.ok(
                checkLiveService.check(cmd)
        );
    }
}
